import request from '../utils/request';

/**
 * 查询所有的商品
 *
 * @return {Promise} 包含商品列表的 Promise 对象
 */
export function findItems() {
    return request
        .get('/manager/item/list')
        .then(response => {
            console.log('Successfully fetched items:', response);
            return response;
        })
        .catch(error => {
            console.error('Failed to fetch items:', error);
            throw error;
        });
}
